Revision: awiki--devo--1.0--patch-145
Archive: lord@emf.net--awiki-2004
Creator: Tom Lord <lord@emf.net>
Date: Sun Oct 31 08:38:27 PST 2004
Standard-date: 2004-10-31 16:38:27 GMT
Modified-files: libbufs/buffer-set.c libbufs/buffer-set.h
    libbufs/buffer-string.c libbufs/buffer-string.h
    libds/obmarkers.c libds/obmarkers.h
New-patches: lord@emf.net--awiki-2004/awiki--devo--1.0--patch-145
Summary: rewrote the implementation of markers
Keywords: 


The implementation of markers /was/ specific to buffer-strings and was
scattered throughout the implementation of buffer-strings.  It used a
bogus representation for markers and so it cost an expected-case
linear number of steps (in the size of the buffer) to update the
markers after each insert and delete.  The code was sufficiently
scattered that it was too hard to debug.

The new 'libds/obmarker.h' capatures the marker abstraction more
cleanly, in a single place, and buffer-strings have been updated
to use the new representation.

(Various kinds of resource "handles" suffer from the same problem:
currently there is no generic handle mechanism (even though it makes
perfect sense to have one).   Code is scattered and reduntantly 
implemented.   These should be cleaned up too, although, unlike
markers, the existing code isn't (at least obviously) terribly buggy
and so there is no time pressure to do so.)


